package com.uuj.dome.controller;

import com.uuj.dome.entity.GoodEntity;
import com.uuj.dome.service.QueryService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * ClassName:QueryController
 * PACKAGE_NAME:com.uuj.dome.controller
 */
@RestController
public class QueryController {

    @Autowired
    QueryService service;

    @GetMapping(value = "/list")
    public List<GoodEntity> list() {
        return service.findAll();
    }

    @GetMapping(value = "/join")
    public List<GoodEntity> join() {
        return service.join();
    }

    @GetMapping(value = "/join/custom")
    public List<GoodEntity> joinCustom() {
        return service.joinCustom();
    }


}
